import { Toast } from 'flowbite-react'
import { FaCheck } from 'react-icons/fa'

export default function ToastMessage({ message, onDismiss }) {
  return (
    <div className="fixed bottom-4 right-4 z-50">
      <Toast>
        <div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-green-100 text-green-500">
          <FaCheck className="h-5 w-5" />
        </div>
        <div className="ml-3 text-sm font-normal">{message}</div>
        <Toast.Toggle onDismiss={onDismiss} />
      </Toast>
    </div>
  )
}